import {request} from "@/plugins/axios";

export function list(params) {
    return request({
        url: '/users',
        params
    })
}

export function get(userId) {
    return request({
        url: `/users/${userId}`
    })
}

export function add(data) {
    return request({
        url: '/users',
        method: 'post',
        data
    })
}

export function del(userId) {
    return request({
        url: `/users/${userId}`,
        method: 'delete'
    })
}

export function update(data) {
    return request({
        url: `/users`,
        method: 'put',
        data
    })
}